import axios from 'axios';
import service from '../request/';

const controller = "Task"

/**
* 
分页
* @param {*} data 
* @returns 
*/
function query(data : any) {
	return service({
		method: 'get',
		url: controller + '/query',
		params: data,
	})
}
/*
修改
*/
function put(data : any) {
	return service({
		method: 'post',
		url: controller + '/Update',
		data: data,
	})
}
/**
* 查找单个
* @param {*} data 
* @returns 
*/
function get(data : any) {
	return service({
		method: 'get',
		url: controller,
		params: data,
	})
}


/**
* 删除
* @param {*} data 
* @returns 
*/
function del(data : any) {
	return service({
		method: 'delete',
		url: controller,
		params: data,
	})
}

/*
添加
*/
function Add(data : any) {
	return service({
		method: 'post',
		url: controller + '/Add',
		data: data,
	})
}

function getall(data : any) {
	return service({
		url: controller + "/getall",
		method: "get",
		params: data,
	})
}

function send(data:any){
    return service({
        url:controller+"/send",
        data:data,
        method:"put"
    })
}

function isok(data:any){
    return service({
        url:controller+"/isok",
        method:"put",
        data:data
    })
}
export default {
	query,
	del,
	get,
	put,
	Add,
	getall,
	send,
	isok,
}